//package com.chinasoft.maysham.manager.exception;
//
//import com.chinasoft.maysham.manager.response.Response;
//import org.springframework.http.HttpStatus;
//import org.springframework.web.bind.annotation.ControllerAdvice;
//import org.springframework.web.bind.annotation.ExceptionHandler;
//
//import javax.servlet.http.HttpServletResponse;
//
//@ControllerAdvice
//public class ExceptionAdvice {
//    @ExceptionHandler(value = Exception.class)
//    public Response<String> handleException(Exception e){
//        return Response.error(e.getMessage());
//    }
//
//    @ExceptionHandler(value = BizException.class)
//    public Response<String> handleBizException(BizException e, HttpServletResponse response){
//        response.setStatus(HttpStatus.BAD_REQUEST.value());
//        return Response.error(e.getMessage());
//    }
//}
